<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>个人信息</title>
    <link rel="stylesheet" href="../css/page-health-orderInfo.css"/>
    <link rel="stylesheet" href="../plugins/elementui/index.css"/>
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/datapicker/datePicker.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <script>
        var changes = getUrlParam("changes")
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="window.location.href='member.html'">返回</i></span>
        <span class="center">个人信息</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="card">
            <div class="project-know">
                <a href="orderNotice.html" class="link-page">
                    <i class="icon-ask-circle"><span class="path1"></span><span class="path2"></span></i>
                    <span class="word">预约须知</span>
                    <span class="arrow"><i class="icon-rit-arrow"></i></span>
                </a>
            </div>
        </div>
        <div class="form-info">
            <div class="info-title">
                <span class="name">信息详情</span>
            </div>
            <form class="info-form">
                <div class="input-row">
                    <label>姓名</label>
                    <label>{{memberInfo.name}}</label>
                </div>
                <div class="input-row single-radio">
                    <label class="radio-title">性别</label>
                    <label>{{memberInfo.sex == '0' ? '未知' : memberInfo.sex == '1' ? '男' : '女'}}</label>
                </div>
                <div class="input-row">
                    <label>手机号</label>
                    <label>{{memberInfo.phoneNumber}}</label>
                </div>
                <div class="input-row">
                    <label>身份证号</label>
                    <label>{{memberInfo.idCard}}</label>
                </div>
                <div class="input-row">
                    <label>生日</label>
                    <label>{{memberInfo.birthday}}</label>
                </div>
                <div class="input-row">
                    <label>邮箱</label>
                    <label>{{memberInfo.email}}</label>
                </div>
                <div class="input-row">
                    <label>注册日期</label>
                    <label>{{memberInfo.regTime}}</label>
                </div>
            </form>
            <div class="box-button">
                <button id="submit" @click="chgInfo()" type="button" class="btn order-btn">点击修改个人信息</button>
            </div>
        </div>
    </div>
</div>
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            //imgUrl:null,
            memberInfo: {
                sex:'1'
            }//用户信息
        },
        methods: {
            chgInfo(){
                window.location.href = '/pages/member_detail_change.html'
            }
        },
        mounted() {
            axios.post("/member/findByCookie.do?").then((res) => {
                if (changes==1){
                    this.$message.success('修改成功');
                }
                if (res.data.flag) {
                    this.memberInfo = res.data.data;
                } else {
                    this.$message.error(res.data.message);
                }
                if(res.data.message == "登录失效"){
                    window.location.href = "/pages/login.html?mdetail=true";
                }
            });
        }
    });
</script>
</body>
</html>